import { createStore } from 'redux';
const initialState = {
  name:'ys',
  age:20
}

function reducer(state = initialState ,action){
  switch(action.type){
    case 'name_type':
      return {...state, name:action.name}
    case 'age_type':
      return {...state, age:action.age}
    default:
      return state
  }
}

const store = createStore(reducer)